const app = getApp()
Page({
  data: {
    domainName: app.domainName,
    sshiData:[],
    sshiLen:0
  },
  onLoad(options) {
    var _this=this;
    wx.request({
      url: app.domainName + 'web/?c=getsyulan',
      method: 'POST',
      data: {openid:app.globalData.openid}, header: { 'content-type': 'application/x-www-form-urlencoded' },
      success: function (res) {
           _this.setData({sshiData:res.data.d, sshiLen:res.data.d.length})
           console.log(_this.data.sshiData.length)
      }});

  },
  goBack(){
    wx.redirectTo({url: '/pages/zdui/index'})
  },
  gowode(){
    wx.redirectTo({url: '/pages/zdui/index'})
  },
  gosaicheng(){
    wx.request({
      url: app.domainName + 'web/?c=isduizhang',
      method: 'POST',
      data: {openid:app.globalData.openid}, header: { 'content-type': 'application/x-www-form-urlencoded' },
      success: function (res) {
           console.log(res.data.s);
           if('y' == res.data.s){
            wx.redirectTo({url: '/pages/saisi/index'})
           }else{
            wx.showToast({
              title: '目前仅支持队长可以查看',
              icon: 'none',
              duration: 1500
            })
           }
          
      }});
  },
  doClick(e){
    var _id=e.currentTarget.dataset.id;
    if('noopen' == _id){
       wx.showToast({
         title: '暂未开放',
         icon: 'none',
         duration: 1500
       })
    }
    console.log(_id)
 }

  
 
})
